home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_olv_torchlight.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  89 lines

  1. # Jones 3D Cog Script
  2. #
  3. # olv_torchlight.cog
  4. #
  5. # [SXC & DS]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13. message     activated
  14. message     startup
  15. message     timer
  16.  
  17. sound       fwoosh=gen_torchlitet_c.wav     local
  18. sound       burning=gen_torch_burnin_c.wav  local
  19. thing       player                          local
  20.  
  21. thing       torchobj
  22. thing       flamepos
  23. template    flametemplate=torchflame    local
  24. keyframe    in_light=in_light_stuff.key    local
  25.  
  26. int         islit = 0
  27. int        donelit=0                local
  28. flex        rvalmin=0.87            local
  29. flex        gvalmin=0.60            local
  30. flex        bvalmin=0.10            local
  31. flex        rvalmax=0.94            local
  32. flex        gvalmax=0.74            local
  33. flex        bvalmax=0.5                local
  34. vector      minlite                local
  35. vector      maxlite                local
  36. vector      zerolite                local
  37.  
  38. end
  39.  
  40. # ========================================================================================
  41.  
  42. code
  43.  
  44. startup:
  45.     player = GetLocalPlayerThing();
  46.     minlite = VectorSet(rvalmin, gvalmin, bvalmin);
  47.     maxlite = VectorSet(rvalmax, gvalmax, bvalmax);
  48.     zerolite= VectorSet(0.0, 0.0, 0.0);
  49.     SetThingLight(torchobj, zerolite, 0.3, 0.1);
  50.     if (islit == 1)
  51.     {
  52.         SetTimer(0.5);
  53.         CreateThing(flametemplate, flamepos);
  54.         SetThingLight(torchobj, minlite, 0.3, 0.01);
  55.         donelit=1;
  56.     }                        
  57.     return;
  58.  
  59. activated:
  60.     if ((GetSenderRef() == torchobj) && (GetCurWeapon(player) == 13))
  61.     {
  62.         if(donelit == 1) return;
  63.         donelit=1;
  64.         MakeMeStop();
  65.         StartCutscene(0);
  66.         PlayKey(player, in_light, 4, 0x12, 1);
  67.         CreateThing(flametemplate, flamepos);                                 
  68.         SetThingLight(torchobj, minlite, 0.3, 0.01);
  69.         PlaySoundThing(fwoosh, torchobj, 0.4, 3, 10, 0);
  70.         SetTimer(0.1);
  71.         ClearActorFlags(player, 0x200000);
  72.         EndCutscene();
  73.     }
  74.     return;
  75.         
  76. timer:
  77.     ThingLightAnim(torchobj, minlite, 0.3, maxlite, 0.3, 1.0);
  78.     PlaySoundThing(burning, torchobj, 1, 3, 10, 1);
  79.     return;
  80.  
  81. end
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.